package com.ces.knacky.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractChildEntity;

/** @author Hibernate CodeGenerator */
public class ItemCategory extends AbstractChildEntity  implements Serializable {

    /** persistent field */
    private com.ces.knacky.model.Category category;

    /** persistent field */
    private com.ces.knacky.model.Item item;

    /** full constructor */
    public ItemCategory(com.ces.knacky.model.Category category, com.ces.knacky.model.Flag flag, com.ces.knacky.model.Item item) {
        this.category = category;
        this.flag = flag;
        this.item = item;
    }

    /** default constructor */
    public ItemCategory() {
    }

    public com.ces.knacky.model.Category getCategory() {
        return this.category;
    }

    public void setCategory(com.ces.knacky.model.Category category) {
        this.category = category;
    }

    public com.ces.knacky.model.Item getItem() {
        return this.item;
    }

    public void setItem(com.ces.knacky.model.Item item) {
        this.item = item;
    }



    public boolean equals(Object other) {
        if ( !(other instanceof ItemCategory) ) return false;
        ItemCategory castOther = (ItemCategory) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
